feat(trace): Spar_Identity property set + spar-trace-topology crate skeleton (v0.10.0 foundation)#205
Open
feat(trace): Spar_Identity property set + spar-trace-topology crate skeleton (v0.10.0 foundation)#205
Conversation
…keleton (v0.10.0 foundation) Adds the v0.10.0 trace-topology foundation (Track G): the Spar_Identity property surface and the spar-trace-topology crate skeleton so future work has a home and the v1 reconciliation contract has a published identity surface. Parsers (PCAPNG / LLDP / Qcc) and the reconciliation engine ship in v0.10.x / v0.11.0 sibling commits per the new design doc. Property set (crates/spar-hir-def/src/standard_properties.rs): - New Spar_Identity::* with 6 properties (MAC_Address, VLAN_ID, Stream_Handle, Multicast_Group, LLDP_Chassis_Id, LLDP_Port_Id) - STANDARD_PROPERTY_SET_NAMES + lookup_table arms + count test 131→137 - Two new tests (set membership + GlobalScope resolution); 28 total standard_properties tests pass. Crate (crates/spar-trace-topology/, ~600 LOC): - identity.rs: 6 typed accessors, typed-first / string-fallback per the existing Spar_TSN pattern. VLAN_ID rejects values outside 0..=4094 on both paths. - ingest.rs: 4 placeholder traits (FrameSource, TopologySource, SwitchConfigSource, PtpTimeSource) with TODO(v0.10.0+) markers pointing at the design doc. - reconcile.rs: ReconcileFinding enum carrying the 5 deterministic check kinds (IdentityUnknown, TopologyMissingWiring, ConfigDrift, GptpOutOfBudget, BinaryMismatch) — type surface only, no engine. - report.rs: TopologyReport struct aggregating findings. - tests/identity_accessors.rs: 6 round-trip tests covering both typed and string-fallback paths for every accessor. Docs: - docs/designs/v0.10.0-trace-topology.md (445 lines / 2728 words): full v1 design — input artefact set, the 5 deterministic checks, SARIF + in-toto attestation predicate URL https://pulseengine.eu/spar-trace-topology/v1, implementation phasing (v0.10.0 foundation → v0.10.x parsers → v0.11.0 engine → v1.0 signed attestation), minimum-viable v1 fixture. - docs/contracts/spar-trace-topology-v1.md (222 lines / 1172 words): external-integrator contract — predicate URL, input artefact list, SARIF rule ids, in-toto envelope shape, stability promise (v1 readers MUST refuse v2+ blobs). Artefacts: - REQ-TRACE-TOPOLOGY-001 (Spar_Identity surface) + REQ-TRACE-TOPOLOGY-002 (crate skeleton) added to requirements.yaml - TEST-TRACE-TOPOLOGY-IDENTITY added to verification.yaml linking both REQ-TRACE-TOPOLOGY-* entries. Out of scope for this PR (v0.10.x / v0.11.0 / v1.0): - Real PCAPNG / LLDP / Qcc parsing - Reconciliation engine - SARIF emission - in-toto attestation signing Workspace version unchanged. Quality gates: cargo build/clippy/fmt clean across the workspace; cargo test --workspace passes (75 test result lines, no failures); rivet validate PASS (99 pre-existing warnings). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
v0.10.0 trace-topology foundation (Track G). Adds the
Spar_Identity::*property surface and thespar-trace-topologycrate skeleton so the v1 reconciliation contract has a published identity surface and future work has a home. Parsers (PCAPNG / LLDP / Qcc / gPTP) and the reconciliation engine ship in v0.10.x / v0.11.0 sibling commits per the new design doc.STANDARD_PROPERTY_SET_NAMESextended; predeclared count 131 → 137.spar-trace-topology(~600 LOC):identitytyped accessors (typed + string-fallback per the existing Spar_TSN pattern),ingestplaceholder traits (FrameSource, TopologySource, SwitchConfigSource, PtpTimeSource),reconcileReconcileFinding enum (5 deterministic check kinds — IdentityUnknown, TopologyMissingWiring, ConfigDrift, GptpOutOfBudget, BinaryMismatch),reportTopologyReport struct.docs/designs/v0.10.0-trace-topology.md(445 lines / 2728 words) — input artefact set, 5 checks, SARIF + in-toto attestation predicate URLhttps://pulseengine.eu/spar-trace-topology/v1, implementation phasing (foundation → parsers → engine → signed attestation), minimum-viable v1 fixture.docs/contracts/spar-trace-topology-v1.md(222 lines / 1172 words) — external-integrator surface; v1 readers MUST refuse v2+ blobs per the variant-contract pattern.Out of scope for this PR: real PCAPNG / LLDP / Qcc parsing (v0.10.x), reconciliation engine + SARIF (v0.11.0), signed in-toto attestation (v1.0). Workspace version unchanged.
Test plan
cargo build --workspace— clean (new crate compiles)cargo test -p spar-trace-topology— 6 accessor round-trip tests passcargo test -p spar-hir-def --lib -- standard_properties— 28/28 pass (count 137 + new Spar_Identity tests)cargo test --workspace— 75 test result lines, no failurescargo clippy --workspace --all-targets -- -D warnings— cleancargo fmt --all -- --check— cleanrivet validate— PASS (99 pre-existing warnings)🤖 Generated with Claude Code